﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Public;
using DAL;

namespace BLL
{
    public class KhaiTuBLL
    {
        public static void InsertKhaiTu(KhaiTuPublic ct)
        {
            KhaiTuDAL.InsertKhaiTu(ct);
        }
        public static KhaiTuPublic LoadKhaiTuByMaKT(int MaKT)
        {
            return KhaiTuDAL.LoadKhaiTuByMaKT(MaKT);
        }
        public static int CountKhaiTuByYear(int firstyear, int lastyear)
        {
            return KhaiTuDAL.CountKhaiTuByYear(firstyear, lastyear);
        }
        public static bool TestSoChungTu(int SoChungTu)
        {
            return KhaiTuDAL.TestSoChungTu(SoChungTu);
        }
        public static KhaiTuPublic LoadKhaiTuBySoKT(int SoKT)
        {
            return KhaiTuDAL.LoadKhaiTuBySoKT(SoKT);
        }
        public static void UpdateKhaiTu(int SoChungTu, int SoBaoTu, DateTime NgayCapBaoTu, string NoiCapBaoTu, string NguoiDangKi, string LyDoChet, DateTime NgayChet, string NoiChet, string NoiOCuoiCung, int CanBoHoTich, DateTime NgayCap, int NguoiCap, byte ChucVu, int NguoiNhan, byte ChucVuNguoiNhan, int MaKT)
        {
            KhaiTuDAL.UpdateKhaiTu(SoChungTu, SoBaoTu, NgayCapBaoTu, NoiCapBaoTu, NguoiDangKi, LyDoChet, NgayChet,NoiChet, NoiOCuoiCung, CanBoHoTich, NgayCap, NguoiCap, ChucVu, NguoiNhan, ChucVuNguoiNhan, MaKT);
        }
        public static void DeleteKhaiTu(int MaKT)
        {
            KhaiTuDAL.DeleteKhaiTu(MaKT);
        }
        public static int CountKhaiTuByDay(DateTime batdau, DateTime ketthuc)
        {
            return KhaiTuDAL.CountKhaiTuByDay(batdau, ketthuc);
        }
        public static void UpdateNgayXoa(int MaNK, DateTime NgayXoa, byte LyDoXoa)
        {
            KhaiTuDAL.UpdateNgayXoa(MaNK, NgayXoa, LyDoXoa);
        }
    }
}
